<?php use_helper('PA_Links') ?>
<div class="sComponentTabs">
  <?php if($sf_user->hasCredential('admin')): ?>
  <a href="javascript:App.loadContent('<?php echo link_to_app('Core', 'homeGetComponent', array('componentModule' => 'StoreSettings', 'name' => 'manageCategories')) ?>', '.sComponentContainer .sComponent')"><div class="sTab sActiveTab">Kategorie</div></a>
  <a href="javascript:App.loadContent('<?php echo link_to_app('Core', 'homeGetComponent', array('componentModule' => 'StoreSettings', 'name' => 'storeSettings')) ?>', '.sComponentContainer .sComponent')"><div class="sTab">Ogólne</div></a>
  <?php elseif($sf_user->hasCredential('user')): ?>
  <a href="javascript:App.loadContent('<?php echo link_to_app('Core', 'homeGetComponent', array('componentModule' => 'StoreSettings', 'name' => 'storeSettings')) ?>', '.sComponentContainer .sComponent')"><div class="sTab sActiveTab">Ogólne</div></a>
  <?php endif; ?>
  <a href="javascript:App.loadContent('<?php echo link_to_app('Core', 'homeGetComponent', array('componentModule' => 'StoreSettings', 'name' => 'documentsSettings')) ?>', '.sComponentContainer .sComponent')"><div class="sTab">Dokumenty</div></a>
</div>
<div class="sComponentContainer">
  <?php if($sf_user->hasCredential('admin')): ?>
  <div class="sComponent floatLeft"><?php include_component('StoreSettings', 'manageCategories') ?></div>
  <?php else: ?>
  <div class="sComponent floatLeft"><?php include_component('StoreSettings', 'storeSettings') ?></div>
  <?php endif; ?>
</div>
